#!/bin/sh

echo "0 0 * * * root %OPTWARE_TARGET_PREFIX%/sbin/logrotate -f %OPTWARE_TARGET_PREFIX%/etc/logrotate.conf &>/dev/null" > %OPTWARE_TARGET_PREFIX%/etc/cron.d/logrotate
chmod 600 %OPTWARE_TARGET_PREFIX%/etc/cron.d/logrotate

if test -e "%OPTWARE_TARGET_PREFIX%/var/run/logrotate.status"; then
    mv %OPTWARE_TARGET_PREFIX%/var/run/logrotate.status %OPTWARE_TARGET_PREFIX%/var/lib/
fi
